package www.cskaoyan.com.bean;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;

public class ClassManager {

    private int id;
    private String beginDate;
    private String className;

    public ClassManager(HashMap parameters) {
        if (parameters == null){
            return;
        }else {
            try {
                // parameters={beginDate=2023-2-27, className=一班}
                if (parameters.containsKey("id")){
                    id = Integer.parseInt((String) parameters.get("id"));
                }
                if (parameters.containsKey("beginDate")){
                    beginDate = (String) parameters.get("beginDate");
                }
                if (parameters.containsKey("className")){
                    className = (String) parameters.get("className");
                }
            }catch (Exception e){
                System.out.println("前端传递参数转化异常: 参考类型异常");
            }
        }
    }

    public ClassManager(int id, String className, String beginDate) {
        this.id = id;
        this.className = className;
        this.beginDate = beginDate;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(String beginDate) {
        this.beginDate = beginDate;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }
}
